﻿CREATE PROCEDURE [dbo].[yaf_rank_list](
                @BoardID INT,
                @RankID  INT  = NULL)
AS
    BEGIN
        IF @RankID IS NULL
        SELECT   a.*
        FROM     yaf_Rank a
        WHERE    a.BoardID = @BoardID
        ORDER BY a.Name
        ELSE
        SELECT a.*
        FROM   yaf_Rank a
        WHERE  a.RankID = @RankID
    END


